<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>여행정보게시판리스트</title>
<script type="text/javascript">
</script>
</head>
<body>
<div style="margin:0 auto">
<div>
<h2 align="left">여행 정보 게시판</h2>

</div>
<hr>
	<table id=1>
		<tr>
		<c:forEach items="${requestScope.lto.tourList}" var="list" begin="0" end="2">
		<td style="padding-left: 10px; padding-right: 10px;">No.${list.tourNo}<span style="float: right;">조회수 : ${list.tourViewcount}</span></td>
		</c:forEach>
 		</tr>
		<tr>
		<c:forEach items="${requestScope.lto.pictureList}" var="list" begin="0" end="2">
		<td width="250" height="150">
		<a href="/Yogiro/tourinfo.do?method=tourShow&page=${requestScope.lto.pagingTO.currentPage }&tourNo=${list.pictureGroup}"><img src="img/${list.pictureRoute}" width="250" height="150"></a>
		</td>
		</c:forEach>
 		</tr>
 		<tr>
		<c:forEach items="${requestScope.lto.tourList}" var="list" begin="0" end="2">
		<td width="250">제목 : ${list.tourTitle}</td>
		</c:forEach>
 		</tr>
 		<tr height="20"></tr>
 		<tr>
		<c:forEach items="${requestScope.lto.tourList}" var="list" begin="3" end="5">
		<td style="padding-left: 10px; padding-right: 10px;">No.${list.tourNo}<span style="float: right;">조회수 : ${list.tourViewcount}</span></td>
		</c:forEach>
		</tr>
 		<tr>
		<c:forEach items="${requestScope.lto.pictureList}" var="list" begin="3" end="5">
		<td width="250" height="150">
		<a href="/Yogiro/tourinfo.do?method=tourShow&page=${requestScope.lto.pagingTO.currentPage }&tourNo=${list.pictureGroup}">
		<img src="img/${list.pictureRoute}" width="250" height="150"></a></td>
		</c:forEach>
 		</tr>
 		<tr>
		<c:forEach items="${requestScope.lto.tourList}" var="list" begin="3" end="5">
		<td width="250">제목 : ${list.tourTitle}</td>
		</c:forEach>
 		</tr>
	</table>
	<p>
	<table align="center">
	<tr>
		<td>		
		<c:choose>
			<c:when test="${requestScope.lto.pagingTO.previousPageGroup }">
				<a href="/Yogiro/tourinfo.do?method=selectTourList&page=${requestScope.lto.pagingTO.startPageOfPageGroup -1 }">
				◀
				</a>
			</c:when>
			<c:otherwise>
				◀
			</c:otherwise>
		</c:choose>
		<c:forEach begin="${requestScope.lto.pagingTO.startPageOfPageGroup }"
							   end="${requestScope.lto.pagingTO.endPageOfPageGroup }"
							   step="1"
							   var ="i">
			<c:choose>
				<c:when test="${i == requestScope.lto.pagingTO.currentPage }">
					${i }
				</c:when>
				<c:otherwise>
					<a href="/Yogiro/tourinfo.do?method=selectTourList&page=${i }">${i }</a>
				</c:otherwise>
			</c:choose>			
		</c:forEach>
		<c:choose>
			<c:when test="${requestScope.lto.pagingTO.nextPageGroup }">
				<a href="/Yogiro/tourinfo.do?method=selectTourList&page=${requestScope.lto.pagingTO.endPageOfPageGroup + 1 }">
					▶
				</a>
			</c:when>
			<c:otherwise>
				▶
			</c:otherwise>
		</c:choose>
		<td>
	</tr>
</table>
<table><tr><td>
<a href="/Yogiro/tourinfo.do?method=tourWrite">여행정보 글쓰기</a>
</td></tr></table>
</div>
</body>
</html>